from django.contrib import admin
from django_cas_ng.views import LoginView, LogoutView
from django.urls import path
from django.urls import path
from django.conf.urls import include, url
from django.conf.urls.static import static
from todo_backend import settings

# 配置todo业务接口
from rest_framework import routers

urlpatterns = [
    url(r'^api2/', include("todo_business.urls")),
    url(r'^', include("weixin_backend.urls")),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

# 配置acs_ng

urlpatterns += [
    path('accounts/login', LoginView.as_view()),
    path('accounts/logout', LogoutView.as_view()),
    path('admin/login/', LoginView.as_view()),
    path('admin/login/', LoginView.as_view()),
    path('login/', LoginView.as_view()),
    path('logout/', LogoutView.as_view()),
]

# 配置后台
urlpatterns += [url(r'^admin/', admin.site.urls), ]
